package sink;

import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;
import pro.unal.edu.datasource.BMPImage;
import pro.unal.edu.datasource.MyImage;

/**
 * @author Carlos
 * @version 1.0
 * @created 17-ago-2011 03:55:43 p.m.
 */
public class MyContainer extends Canvas{
    MyImage imgd;
	public MyContainer(MyImage img){
            imgd = img;
            paint(this.getGraphics());
	}

    @Override
    public void paint(Graphics g) {
//        super.paint(g);
        
             
          for (int i = ((BMPImage)imgd).getDataImage().size() - 1; i >= 0; i--) {
            for (int j = 0; j < ((BMPImage)imgd).getDataImage().get(i).size(); j++) {
                  
              //  g.setColor(((BMPImage)imgd).getDataImage().get(i).get(j));
                this.getGraphics().setColor(Color.BLUE);
                this.getGraphics().drawLine(i, j, i, j);
                System.out.print(((BMPImage)imgd).getDataImage().get(i).get(j) + " :) ");
            }
            System.out.println("");
        }
    }
        
	public void finalize() throws Throwable {

	}

}